package cn.wolfcode.transfer.util;

public enum  QuestionUtil {
    单选("单选题",1),
    多选("多选题",2),
    判断("判断题",3),
            ;
    private String name;
    private Integer value;

    QuestionUtil(String name, Integer value) {
        this.name = name;
        this.value = value;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getValue() {
        return value;
    }

    public void setValue(Integer value) {
        this.value = value;
    }
    public static String forQuestionValue(Integer getvalue){
        QuestionUtil[] values = QuestionUtil.values();
        for (QuestionUtil value:values){
            if (value.value==getvalue){
                return value.name;
            }
        }
        return null;
    }
}
